Methods and systems for quality controlled encoding

ABSTRACT

This disclosure describes techniques for controlling a perceived quality of multimedia sequences to try to achieve a desired constant perceptual quality regardless of the content of the sequences. In particular, an encoding device may implement quality control techniques to associate a sequence segment with a content “class” based on the content of the segment, determine a perceptual quality metric of the sequence segment, and adjust at least one encoding parameter used to encode the segment is encoded such that for the perceptual quality of the sequence segment converges to the desired quality.

TECHNICAL FIELD

The disclosure relates to multimedia encoding and decoding and, moreparticularly, controlling the quality of encoded multimedia sequences.

BACKGROUND

Digital video (and more generally any multimedia sequence, i.e., audio,video, and pictures, or other lossy compression data) capabilities canbe incorporated into a wide range of devices, including digitaltelevisions, digital direct broadcast systems, wireless communicationdevices, personal digital assistants (PDAs), laptop computers, desktopcomputers, video game consoles, digital cameras, digital recordingdevices, cellular or satellite radio telephones, and the like. Digitalvideo devices can provide significant improvements over conventionalanalog video systems in processing and transmitting video sequences.

Different video encoding standards have been established for encodingdigital video sequences. The Moving Picture Experts Group (MPEG), forexample, has developed a number of standards including MPEG-1, MPEG-2and MPEG-4. Other examples include the International TelecommunicationUnion (ITU)-T H.263 standard, and the ITU-T H.264 standard and itscounterpart, ISO/IEC MPEG-4, Part 10, i.e., Advanced Video Coding (AVC).These video encoding standards support improved transmission efficiencyof video sequences by encoding data in a compressed manner.

Many current techniques make use of block-based coding. In block-basedcoding, frames of a multimedia sequence are divided into discrete blocksof pixels, and the blocks of pixels are coded based on the differenceswith other blocks. Some blocks of pixels, often referred to as“macroblocks,” comprise a grouping of sub-blocks of pixels. As anexample, a 16×16 macroblock may comprise four 8×8 sub-blocks. Thesub-blocks may be encoded separately. For example, the H.264 standardpermits encoding of blocks with a variety of different sizes, e.g.,16×16, 16'8, 8'16, 8'8, 4×4, 8×4, and 4×8. Further, by extension,sub-blocks of any size may be included within a macroblock, e.g., 2×16,16×2, 2×2, 4×16, 8×2 and so on.

SUMMARY

This disclosure describes encoding techniques for controlling quality ofencoded sequences of data. Generally, certain aspects of certainembodiments of the disclosure can be applied to any multimedia stream(i.e., audio, video, pictures, or any data using lossy compression).However, for brevity and without limitation, the certain embodiments ofthe disclosure are described and illustrated using video, multimediadata.

In certain aspects, a method for processing a sequence of digital videodata comprises one or a combination of: encoding a segment of dataassociated with the digital video data using a set of encodingparameters; analyzing one or more properties of the encoded segment ofdata to associate the segment of data with one of a plurality of contentclasses; adjusting at least one of the encoding parameters used toencode the segment of data based at least on a perceived quality metricof the encoded segment of data and a target quality metric, whichcorresponds to the associated content class; and re-encoding the segmentof data using the adjusted encoding parameters.

In certain aspects, an apparatus for processing digital video datacomprises one or a combination of: an encoding module that encodes asegment of data associated with the digital video data using a set ofencoding parameters; a content classification module that analyzes oneor more parameters of the encoded segment of data to associate thesegment of data with one of a plurality of content classes; and aquality control module that adjusts at least one of the encodingparameters used to encode the segment of data based at least on aperceived quality metric of the encoded segment of data and a targetquality metric, which corresponds to the associated content class,wherein the encoding module re-encodes the segment of data using theadjusted encoding parameter.

In certain aspects, an apparatus for processing digital video datacomprises one or a combination of: means for encoding a segment of dataassociated with the digital video data using a set of encodingparameters; means for analyzing one or more properties of the encodedsegment of data to associate the segment of data with one of a pluralityof content classes; means for adjusting at least one of the encodingparameters used to encode the segment of data based at least on aperceived quality metric of the encoded segment of data and a targetquality metric, which corresponds to the associated content class; andmeans for re-encoding the segment of data using the adjusted encodingparameter.

In certain aspects, a machine readable medium having instructions storedthereon, the stored instructions including one or more segments of code,and being executable on one or more machines, the one or more segmentsof code comprises one or a combination of code for encoding a segment ofdata associated with the digital video data using a set of encodingparameters; code for analyzing one or more properties of the encodedsegment of data to associate the segment of data with one of a pluralityof content classes; code for adjusting at least one of the encodingparameters used to encode the segment of data based at least on aperceived quality metric of the encoded segment of data and a targetquality metric, which corresponds to the associated content class; andcode for re-encoding the segment of data using the adjusted encodingparameter.

In certain aspects, a method for processing multimedia data comprisesone or a combination of: computing a perceived quality metric for anencoded segment of data associated with digital video data; andselecting one of a plurality of content classes based on the perceivedquality metric and one of at least one encoding parameter used to encodethe segment of data and a resultant bitrate of the encoded segment ofdata, wherein separating the blocks of pixels into groups based on atleast one difference metric can include one or a combination of:separating possible difference metrics into groups, wherein at least aportion of the groups include two or more difference metrics;pre-computing quality metrics associated with each of the groups,wherein the quality metrics for the groups is equal to an average ofquality metrics corresponding to each of the difference metricsassociated with the groups; and pre-computing weights for each of thegroups, wherein the weights for each of the groups are computed based onat least a portion of the difference metrics associated with the bins.

In certain aspects, an apparatus for processing multimedia datacomprises one or a combination of: a quality measurement module thatcomputes a perceived quality metric for an encoded segment of dataassociated with digital video data; and a class selection module thatselects one of a plurality of content classes based on the perceivedquality metric and one of at least one encoding parameter used to encodethe segment of data and a resultant bitrate of the encoded segment ofdata, wherein the quality measurement module further performs one or acombination of: separates possible difference metrics into groups,wherein at least a portion of the groups include two or more differencemetrics; pre-computes quality metrics associated with each of thegroups, wherein the quality metrics for the groups is equal to anaverage of quality metrics corresponding to each of the differencemetrics associated with the groups; and pre-computes weights for each ofthe groups, wherein the weights for each of the groups are computedbased on at least a portion of the difference metrics associated withthe bins.

In certain aspects, an apparatus for processing multimedia datacomprises one or a combination of: means for computing a perceivedquality metric for an encoded segment of data associated with digitalvideo data; and means for selecting one of a plurality of contentclasses based on the perceived quality metric and one of at least oneencoding parameter used to encode the segment of data and a resultantbitrate of the encoded segment of data, wherein the means for separatingthe blocks of pixels into groups based on at least one difference metricincludes one or a combination of: means for separating possibledifference metrics into groups, wherein at least a portion of the groupsinclude two or more difference metrics; means for pre-computes qualitymetrics associated with each of the groups, wherein the quality metricsfor the groups is equal to an average of quality metrics correspondingto each of the difference metrics associated with the groups; and meansfor pre-computes weights for each of the groups, wherein the weights foreach of the groups are computed based on at least a portion of thedifference metrics associated with the bins.

In certain aspects, a machine readable medium having instructions storedthereon, the stored instructions including one or more portions of code,and being executable on one or more machines, the one or more portionsof code comprises one or a combination of: code for computing aperceived quality metric for an encoded segment of data associated withdigital video data; and code for selecting one of a plurality of contentclasses based on the perceived quality metric and one of at least oneencoding parameter used to encode the segment of data and a resultantbitrate of the encoded segment of data, wherein the code for computingthe perceived quality metric further includes one or a combination of:code for separating blocks of pixels of frames of data associated withthe segment into groups based on at least one difference metricassociated with each of the blocks of pixels; code for associatingquality metric values and weight values with each of the groups ofblocks of pixels; and code for computing a weighted quality metric forthe segment of data based on the quality metric values and weight valuesassociated with of the groups.

(and more generally any multimedia, audio, video, and pictures, or otherlossy compression)

The details of one or more examples are set forth in the accompanyingdrawings and the description below. Other features, objects, andadvantages will be apparent from the description and drawings, and fromthe claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a video encoding and decodingsystem that employs the quality control techniques of this disclosure.

FIG. 2 is a block diagram illustrating an exemplary contentclassification module that associates a segment of data with one of aplurality of content classes.

FIG. 3 is a graph illustrating exemplary quality-rate curves thatrepresent content classes.

FIG. 4 is a block diagram illustrating an exemplary quality controlmodule that dynamically adjusts one or more encoding parameters using toencode a segment of data.

FIG. 5 is a diagram illustrating an exemplary encoding technique forencoding segments of data in accordance with techniques of thisdisclosure.

FIG. 6 is a flow diagram illustrating exemplary operation of an encodingdevice controlling the quality of an encoded segment of data inaccordance with techniques of this disclosure.

FIG. 7 is a flow diagram illustrating exemplary operation of a qualitymeasurement module computing a weighted quality metric.

FIG. 8 is a flow diagram illustrating exemplary operation of a contentclassification module associating a segment of data with one of aplurality of content classes.

DETAILED DESCRIPTION

This disclosure describes encoding techniques for controlling quality ofencoded sequences of data. Generally, certain aspects of certainembodiments of the disclosure can be applied to any multimedia stream(i.e., audio, video, pictures, or any data using lossy compression).However, for brevity and without limitation, the certain embodiments ofthe disclosure are described and illustrated using video, multimediadata. In particular, the techniques of this disclosure attempt tocontrol the perceived quality as experienced by a viewer. The perceivedquality as experienced by a viewer may differ based on the content, orproperties, of the sequences of data. In other words, sequences encodedusing the same encoding parameters may have different perceivedqualities based on the content of the sequences. For example, a highmotion sports sequence encoded at a quantization parameter (QP) of 36may look much better than a low motion sequence encoded at the same QP.This may be primarily due to the fact that motion in the sports sequencetends to increase the perceived visual quality at higher QPs. If, on theother hand, the sports sequence was encoded at a lower QP at which thelow motion sequence looked good, the perceptual quality may improve, butthe cost of increased bitrate outweighs the incremental improvement inperceptual quality. Note that, when the certain embodiments are appliedto other multimedia streams (i.e., audio streams), then the perceptualquality might be auditory, instead of visual as with video streams.

This disclosure provides techniques to control the perceived quality ofthe sequences to try to achieve a desired constant perceptual qualityregardless of the content, or properties, of the sequences. As will bedescribed in detail herein, an encoding device implements qualitycontrol techniques to associate a sequence segment with a content“class” based on the content of the segment, determine a observedperceptual quality of the sequence segment, and adjust one or moreencoding parameters based on the observed perceptual quality and thecontent class associated with the segment of data. If time permits, thesegment of data may be re-encoded using the adjusted encodingparameters. Alternatively, the subsequent segment of data may beinitially encoded using the adjusted encoding parameters. In thismanner, the segments of data are encoded such that for the observedperceptual quality of the sequence segment converges to the desiredperceptual quality.

FIG. 1 is a block diagram illustrating a video encoding and decodingsystem 10 that employs the quality control techniques described herein.Encoding and decoding system 10 includes an encoding device 12 and adecoding device 14 connected by a transmission channel 16. Encodingdevice 12 encodes one or more sequences of digital video data andtransmits the encoded sequences over transmission channel 16 to decodingdevice 14 for decoding and presentation to a user of decoding device 14.Transmission channel 16 may comprise any wired or wireless medium, or acombination thereof.

Encoding device 12 may form part of a broadcast network component usedto broadcast one or more channels of video data. As an example, encodingdevice 12 may form part of a wireless base station, server, or anyinfrastructure node that is used to broadcast one or more channels ofencoded video data to wireless devices. In this case, encoding device 12may transmit the encoded data to a plurality of wireless devices, suchas decoding device 14. A single decoding device 14, however, isillustrated in FIG. 1 for simplicity.

Decoding device 14 may comprise a user-device that receives the encodedvideo data transmitted by encoding device 12 and decodes the video datafor presentation to a user. By way of example, decoding device 14 may beimplemented as part of a digital television, a wireless communicationdevice, a gaming device, a portable digital assistant (PDA), a laptopcomputer or desktop computer, a digital music and video device, such asthose sold under the trademark “iPod,” or a radiotelephone such ascellular, satellite or terrestrial-based radiotelephone, or otherwireless mobile terminal equipped for video streaming, video telephony,or both.

In some aspects, for two-way communication, encoding and decoding system10 may support video telephony or video streaming according to theSession Initiated Protocol (SIP), International Telecommunication UnionStandardization Sector (ITU-T) H.323 standard, ITU-T H.324 standard, orother standards. Encoding device 12 may generate encoded video dataaccording to a video compression standard, such as Moving PictureExperts Group (MPEG)-2, MPEG-4, ITU-T H.263, or ITU-T H.264. Althoughnot shown in FIG. 1, encoding device 12 and decoding device 14 may beintegrated with an audio encoder and decoder, respectively, and includeappropriate multiplexer-demultiplexer (MUX-DEMUX) modules, or otherhardware, firmware, or software, to handle encoding of both audio andvideo in a common data sequence or separate data sequences. Ifapplicable, MUX-DEMUX modules may conform to the ITU H.223 multiplexerprotocol, or other protocols such as the user datagram protocol (UDP).In some aspects, this disclosure contemplates application to EnhancedH.264 video coding for delivering real-time video services interrestrial mobile multimedia multicast (TM3) systems using the ForwardLink Only (FLO) Air Interface Specification, “Forward Link Only AirInterface Specification for Terrestrial Mobile Multimedia Multicast,”published as Technical Standard TIA-1099, August 2006 (the “FLOSpecification”). However, the quality control techniques described inthis disclosure are not limited to any particular type of broadcast,multicast, or point-to-point system.

As illustrated in FIG. 1, encoding device 12 includes an encoding module18, a memory 20, a content classification module 22, a quality controlmodule 24, and a transmitter 26. Encoding module 18 receives one or moreinput video sequences 28A-28N (collectively, “video sequences 28”) fromone or more sources, and selectively encodes the video sequences 28.Encoding module 18 may, for example, receive video sequences 28 from animage capture device (not shown) integrated within encoding device 12 orcoupled to encoding device 12. Alternatively, encoding module 18 mayreceive video sequences 28 from memory 20. Video sequences 28 maycomprise live real-time video, audio, or video and audio sequences to becoded and transmitted as a broadcast or on-demand, or may comprisepre-recorded and stored video, audio, or video and audio flows to becoded and transmitted as a broadcast or on-demand. Although described inthe context of real-time services, the techniques of this disclosure mayalso be applied to near real-time services, non-real time services, or acombination of real-time services, near real-time services and non-realtime services. For purposes of illustration, however, this disclosuredescribes use of the quality control techniques on real-time services.

In some aspects, encoding module 18 may also combine the encodedsequences of data into a transmission frame for transmission viatransmitter 26. In particular, encoding module 18 may encode, combine,and transmit portions of video sequences 28 received over a period oftime. As an example, encoding module 18 may operate on video sequences28 on a per second basis. In other words, encoding module 18 encodesone-second segments of data of the plurality of video sequences 28,combines the encoded one-second segments of data to form a superframe ofdata, and transmits the superframe over transmission channel 16 viatransmitter 26. As used herein, the term “superframe” refers to a groupof segments of data collected over a time period or window, such as aone-second time period or window. The segments of data may include oneor more frames of data. Although the techniques of this disclosure aredescribed in the context of one-second segments of data, the techniquesmay also be utilized for encoding, combining and transmitting othersegments of data, such as for segments of data received over a differentperiod of time, that may or may not be a fixed period of time, or forindividual frames or sets of frames of data. In other words, superframescould be defined to cover larger or smaller time intervals thanone-second periods, or even variable time intervals.

Note that throughout this disclosure, a particular chuck of multimediadata (e.g., similar to the concept of a superframe) refers to any chunkof multimedia data of a particular size and/or duration, where theparticular size and/or duration is based at least in part on thephysical layer and/or MAC layer characteristics and/or parameters of thesystem used for passing on the multimedia data. Note that the particularsize and/or duration can be statically and/or dynamically assigned.

Encoding module 18 may attempt to output each of the video sequences 28at a constant quality level. For example, encoding module 18 may attemptto maintain a constant perceived quality for video sequences 28regardless of the content, or properties, of video sequences 28. Inother words, encoding module 18 may attempt to output each of videosequences 28 at a target quality level. The target quality level may bepre-selected, selected by a user, selected through an automatic processor a semi-automatic process requiring an input from a user or fromanother process, or selected dynamically by encoding device 12 or system10 based on predetermined criteria. The target quality level can beselected based on, for example, the type of encoding application, or thetype of client device to which the encoded video data is sent.

To maintain the constant perceived quality level, encoding module 18 mayselect or adjust one or more encoding parameters based on a perceivedquality metric and the content of the video sequences. To this end,content classification module 22 classifies the segments of data of thevideo sequences with one of a plurality of classes. In some cases,content classification module 22 classifies the segments of data afterthe segments of data have initially been encoded. In such a case,encoding module 18 may encode the segments of data using an initial setof encoding parameters. Encoding module 18 may, for example, initiallyencode the segment of data using a QP at which the previous segment ofdata was encoded. Thus, encoding module 18 may operate under theheuristic that two consecutive segments of data of a video sequence havesimilar content, i.e., the content class of the current segment of datais similar to the content class of the previous segment of data.Alternatively, encoding module 18 may be configured to initially encodeall segments of data at a particular QP. For example, encoding module 18may be configured to initially encode every segment of data at a QP of33.

To assist in classifying the segments of data, content classificationmodule 22 may compute a perceived quality metric associated with theencoded segment of data. In certain aspects, content classificationmodule 22 may compute a weighted quality metric associated with theencoded segment of data. The weighted quality metric may provide anobjective video quality metric that is closer to the subjective qualityas experienced by a viewer. Content classification module 22 may computethe weighted quality metric by separating blocks of pixels of one ormore frames of data associated with the segment into groups based ondifference metrics associated with each of the blocks of pixels,associating quality metrics and weights with each of the groups ofblocks of pixels, and computing the weighted quality metric based on thenumber of blocks of pixels in each of the groups as well as the qualitymetrics and weights associated with the groups. As described above, theblocks of pixels may be of any size, such as the sizes specified in theH.264 standard.

Additionally, content classification module 22 may analyze the contentof the encoded segment of data to associate the segment of data with oneof a plurality of content classes. In certain aspects, the contentclasses may comprise one or more curves that model a quality metric,such as peak signal to noise ratio (PSNR), as a function of a bitrate.Content classification module 22 may select the one of the curves thatmost closely corresponds to the encoded segment of data based on theperceived quality metric and at least one of the encoding parameters(e.g., bitrate, QP, or the like) used to encode the segment of data. Ininstances where the encoding parameters do not match those used togenerate the content classes, content classification module 22 maynormalize the encoding parameters used to encode the segment of data anduse at least one of the normalized encoding parameters and the perceivedquality metric to select the one of the curves most closelycorresponding to the encoded segment. Alternatively, contentclassification module 22 may select the one of the curves that mostclosely corresponds to the encoded segment of data based on theperceived quality metric and a resultant bitrate of the encoded segmentof data (i.e., a bitrate achieved using a particular set of encodingparameters).

In another aspect, the content classes may comprise classes based oncomplexity (e.g., spatial complexity and/or temporal complexity) of thedata of the segment. Content classification module 22 may classifytexture information, e.g., contrast ratio values, into categories of“high,” “medium,” and “low” (on an x-axis) and classify motioninformation, e.g., motion vectors, into categories of “high,” “medium,”and “low,” (on a y-axis), and classify the segment of data with one ofthe classes based on a point of intersection between the motioncategories and the texture categories. The class to which the segment ofdata is associated may correspond with a particular quality-rate curve.Alternatively, the class to which the segment of data is associated maycorrespond to one or more encoding parameters. One such contentclassification method is described in co-pending and commonly assignedU.S. patent application Ser. No. 11/373,577, entitled “CONTENTCLASSIFICATION FOR MULTIMEDIA PROCESSING” and filed on Mar. 10, 2006,the entire content of which is incorporated herein by reference.

Quality control module 24 determines a target quality associated withthe content class to which the segment of data belongs. In some cases,conventional quality metrics, such as PSNR, do not always accuratelymeasure the perceptual visual video quality as experienced by viewer. Inthese cases, the target quality metric associated with each of thecontent classes may differ. In particular, quality control module 24 mayadjust the target quality metric associated with each of the contentclasses to account for the fact that sequences of different contentclasses appear perceptually different at the same PSNR.

Quality control module 24 compares the perceived quality metric (e.g.,the weighted quality metric) to the target quality metric. If thedifference between the perceived quality metric and the target qualitymetric exceeds a threshold, quality control module 24 adjusts at leastone of the encoding parameters. For example, if the perceived qualitymetric is greater than the target quality metric by the threshold,quality control module 24 increases a QP used for encoding the segmentof data. Likewise, if the perceived quality metric is less than thetarget quality metric by the threshold, quality control module 24decreases a QP used for encoding the segment of data. Quality controlmodule 24 may adjust encoding parameters other than QP, such as framerate, encoding modes, deblocking, coefficient trimming, motion vectorrefinement and the like.

After quality control module 24 adjusts the encoding parameters,encoding module 18 may perform a second pass encoding on the segment ofdata using the adjusted encoding parameters. For example, encodingmodule 18 may re-encode the segment of data at the adjusted QP. Thesecond pass encoding effectively refines the perceived quality metrictowards the desired target quality metric. Moreover, the second passencoding may re-establish the content class of the video sequence. Incertain aspects, encoding module 18 may only perform the second passencoding when computation processing time permits. In another aspect,encoding module 18 may perform more than two encoding passes in anattempt to refine the observed quality.

After encoding module 18 has performed the last encoding pass, e.g.,after the second encoding pass or after the first encoding pass ifencoding module 18 does not need re-encode, encoding device 12 transmitsthe encoded segments of data via transmitter 26. Transmitter 26 mayinclude appropriate modem and driver circuitry to transmit encoded videoover transmission channel 16. For wireless applications, transmitter 26includes RF circuitry to transmit wireless data carrying the encodedvideo data.

Decoding device 14 receives the encoded data via receiver 30. Liketransmitter 26, receiver 30 may include appropriate modem and drivercircuitry to receive encoded video over transmission channel 16, and mayinclude RF circuitry to receive wireless data carrying the encoded videodata in wireless applications. In some examples, encoding device 12 anddecoding device 14 each may include reciprocal transmit and receivecircuitry so that each may serve as both a source device and a receivedevice for encoded video and other information transmitted overtransmission channel 16. In this case, both encoding device 12 anddecoding device 14 may transmit and receive video sequences and thusparticipate in two-way communications. In other words, the illustratedcomponents of multimedia encoding device 10 may be integrated as part ofan encoder/decoder (CODEC).

Decoding module 32 decodes the encoded segments of data for presentationto a user. Decoding device 14 may further present the decoded segmentsof data to a user via a display (not shown) that may be eitherintegrated within decoding device 14 or provided as a discrete devicecoupled to decoding device 14 via a wired or wireless connection.

The components in encoding device 12 and decoding device 14 areexemplary of those applicable to implement the techniques describedherein. Encoding device 12 and decoding device 14, however, may includemany other components, if desired. For example, encoding device 12 mayinclude a plurality of encoding modules that each receive one or moresequences of video data and encode the respective sequences of videodata in accordance with the techniques herein. In this case, encodingdevice 12 may further include at least one multiplexer to combine thesegments of data for transmission. In addition, encoding device 12 anddecoding device 14 may include appropriate modulation, demodulation,frequency conversion, filtering, and amplifier components fortransmission and reception of encoded video, including radio frequency(RF) wireless components and antennas, as applicable. For ease ofillustration, however, such components are not shown in FIG. 1.

The components in encoding device 12 and decoding device 14 may beimplemented as one or more processors, digital signal processors,application specific integrated circuits (ASICs), field programmablegate arrays (FPGAs), discrete logic, software, hardware, firmware, orany combinations thereof. Depiction of different features as modules isintended to highlight different functional aspects of encoding device 12and decoding device 14 and does not necessarily imply that such modulesmust be realized by separate hardware or software components. Rather,functionality associated with one or more modules may be integratedwithin common or separate hardware or software components. Thus, thedisclosure should not be limited to the example of encoding device 12and decoding device 14.

FIG. 2 is a block diagram illustrating an exemplary contentclassification module 40 that associates a segment of data with one of aplurality of content classes in accordance with the techniques describedherein. Content classification module 40 may, for example, representcontent classification module 22 of encoding device 12 (FIG. 1). Contentclassification module 40 includes a quality measurement module 42, anencoding parameter normalization module 44, and a class selection module46.

As described above, encoding module 18 (FIG. 1) performs a first passencoding of the received segment of data. The first pass encoding of thesegment of data may be performed using encoding parameters used forencoding the previous segment of data. Alternatively, the first passencoding of the segment of data may be performed using the adjustedencoding parameters of the previous segment of data, even if theprevious segment of data was not re-encoded using the adjusted encodingparameters. As another example, the first pass encoding of the segmentof data may be performed using a configured set of encoding parameters.After the first pass encoding, content classification module 40associates the segment of data with one of a plurality of contentclasses. To do so, content classification module 40 may associate thesegment of data with one of the content classes based on a perceivedquality metric of the encoded segment of data and either one or moreencoding parameters that corresponds with the parameters used forgenerating the classes or a resultant bitrate of the encoded segment ofdata. As described below, in some aspects the one or more encodingparameters may be normalized to correspond with the encoding parametersused to generate the content classes.

Quality measurement module 42 computes the perceived quality metric forthe encoded segment of data. The perceived quality metric may, forexample, be an observed PSNR, a weighted PSNR, Mean Opinion Score (MOS),or other quality metric. In computing the perceived quality metric,quality measurement module 42 may account for the fact that conventionalquality metrics, such as PSNR, are not always an accurate measure of theperceptual video quality as experienced by a viewer. This is especiallytrue for low intensity sequences or frames, where the average frame PSNRis biased by the low intensity areas which have low mean square errors.These areas do not typically contribute to the overall perceptual videoquality because the human visual system does not perceive them as areasof interest.

To address this problem, quality measurement module 42 computes aweighted quality metric (e.g., weighted PSNR). The weighted qualitymetric provides an objective video quality metric that more closelyresembles the subjective quality as perceived by a viewer thanconventional PSNR. To compute the weighted quality metric, qualitymeasurement module 42 separates blocks of pixels of one or more framesof data of the segment into groups based on at least one differencemetric associated with each of the blocks of pixels. Quality measurementmodule 42 may, for example, group the blocks of pixels of one or moreframes of data into groups based on sum of absolute differences (SADs),SADs per pixel (SPPs), sum of squared differences (SSDs), or similardifference metric associated with each of the blocks of pixels. Otherexamples may use sum of absolute transformed difference (SATD), or sumof squared transformed difference (SSTD). For exemplary purposes, thisdisclosure discusses separating the blocks of pixels of one or moreframes of data into groups based on SPP values associated with each ofthe blocks of pixels. It should be apparent, however, that qualitymeasurement module 42 may separate the blocks of pixels into groupsbased on other difference metrics.

Quality measurement module 42 computes SPP values for the blocks ofpixels at least based on a block mode decision. Quality measurementmodule 42 may, for example, compute an SPP value for the block of pixelsin accordance with the equation:

$\begin{matrix}{{{SPP} = {\sum\limits_{i = 0}^{n - 1}{\left( {SAD}_{i} \right)/n}}},} & (1)\end{matrix}$

where SPP is the SPP value computed for the block of pixels, SADi is theSAD value for the ith pixel of the block of pixels, and n is the numberof pixels in the block of pixels. The SPP values associated with each ofthe block of pixels range from zero to n. For a 16×16 block of pixels,where n is equal to 256, the SPP values associated with the blocks ofpixels range from 0 to 255. An SPP value of zero indicates that apredicted block of pixels and the original block of pixels are exactlythe same. On the other hand, an SPP value of 255 indicates the oppositeextreme, i.e., that the predicted block of pixels and the original blockof pixels are extremely different.

Quality measurement module 42 may pre-compute a quality metricassociated with each SPP value. For exemplary purposes, the techniquesof this disclosure will be discussed in terms of a PSNR quality metric.However, it should be understood that the techniques may be utilizedusing any quality metric. Quality measurement module 42 may pre-computea PSNR value associated with each of the SPP values. In one example,quality measurement module 42 may pre-compute the PSNR value associatedwith each of the SPP values according to the equation:

PSNR _(i) =10 log₁₀(2−1)/SPP _(i) ²,   (2)

where PSNR_(i) is the PSNR value associated with the i^(th) SPP valueand SPP_(i) is the i^(th) SPP value.

Quality measurement module 42 separates the entire range of SPP valuesinto a plurality of groups, with each of the groups corresponding to oneor more SPP values. In one example, quality measurement module 42 mayseparate the entire range (0 . . . 255) of SPP values into 64 groups,with each of the groups representing four consecutive SPP values.Alternatively, quality measurement module 42 may group non-consecutiveSPP values into a plurality of groups. Quality measurement module 42associates a quality metric, e.g., a PSNR value, with each of thegroups. For instance, quality measurement module 42 averages the PSNRvalues associated with each of the SPP values belonging to the groups toobtain an average PSNR value for each of the groups.

Quality measurement module 42 may further associate a weight with eachof the groups. In certain aspects, quality measurement module 42 mayassociate a weight computed using a logarithmic weight function witheach of the groups. The logarithmic weight function may be a function ofthe SPP values corresponding with the groups. Quality measurement module42 may determine the weight to associate with each of the groupsaccording to the equation:

Wt_(i)=log₁₀(SPP _(j)),   (3)

where Wt_(i) is the weight associated with the i^(th) group, SPP_(j) isthe SPP value of the j^(th) pixel, k=0, 1, . . . , 64 in the case ofsixty-four separate groups, and j is the highest SPP value associatedwith i^(th) group. In the case of a 16×16 block of pixels withsixty-four groups j=3, 7, 11 . . . , 255. The weight associated witheach of the groups assists in adjusting a block count for each group. Inother words, the weight indicates the number of blocks within each ofthe groups that should count towards the computed PSNR of the segment ofdata. The weight function assigns higher weights to the groups whichhave higher SPP values.

As described above, the segment of data may include one or more framesof data that include one or more blocks of pixels. Quality measurementmodule 42 separates the blocks of pixels of the frames of the segment ofdata into one of the groups based on the SPP values associated with theblocks of pixels. After all of the blocks of pixels of the segment ofdata have been grouped, quality measurement module 42 computes apercentage of blocks of pixels per group. In certain aspects, blocks ofpixels that are determined to be skipped are excluded from thepercentage of blocks of pixels per group computation. Qualitymeasurement module 42 computes the weighted quality metric for thesegment of data based on the percentage of blocks of pixels per group,the quality metrics associated with the groups and the weightsassociated with the groups. In one example, quality measurement modulecomputes the weighted quality metric according to the equation:

Wt_(—) Q=Σ(Wt[i]*MBPerc[i]*Group_(—) Q[i])/TotalMBCnt,   (4)

where Wt_Q is the weighted quality metric, i=0, 1, . . . , n, n is equalto the number of groups, Wt[i] is the weight associated with the i^(th)group, MBPerc[i] is a percentage of total number of blocks of thesegment included in the i^(th) group, Group_Q/i] is the quality metricassociated with the i^(th) group, and TotalMBCnt is a total number ofblocks of pixels in the segment of data. TotalMBCnt is calculated usingthe equation:

TotalMBCnt=Σ(Wt[i]*MBPerc[i])   (5)

over all i groups. By computing a quality metric for the segment of datain the manner described above, an objective video quality metric may becloser to the subjective quality experienced by a viewer relative toconventional quality metrics.

In the case in which the encoding parameters used to encode the segmentof data do no match the encoding parameters used to generate the contentclasses, content classification module 40 may normalize one or more ofthe encoding parameters to correspond with the encoding parameters usedto generate the content classes. In certain aspects, encoding parameternormalization module 44 normalizes a bitrate used to encode the segmentof data to correspond to the parameters used to generate the contentclasses. Normalizing the bitrate may reduce the effect that the actualsequence of frame types and frame rate of the segment of data, and theQP used during encoding of the segment data have on the bitrate.

In certain aspects, the content classes may comprise quality-rate curvesthat model a quality metric, such as PSNR, as a function of a bitrate.In this case, the encoding parameters are normalized to the parametersused for generating the quality-rate curves. For example, encodingparameter normalization module 44 may normalize the bitrate used toencode the segment of data to the bitrate used to generate thequality-rate curves in accordance with the following equation and table

R=γ_(FPS)(φ_(I)* Rate_(I) +φ _(P)*Rate_(P)+φ_(B)*Rate_(B))   (6)

where R is the normalized bitrate, γ_(FPS) is a scaling factor used toscale the bitrate to its 30 frame per second (fps) equivalent, φ_(I) isa scaling factor used to scale the bitrate of I frames to a setpoint QPequivalent, Rate_(I) is an observed bitrate of the I frames of thesegment of data, φ_(P) is a scaling factor used to scale the bitrate ofP frames to a setpoint QP equivalent, Rate_(P) is an observed bitrate ofthe P frames of the segment of data, φ_(B) is a scaling factor used toscale the rate of B frames to a setpoint QP equivalent, and Rate_(B) isan observed bitrate of the B frames of the segment of data. In otherwords, the observed bitrate of the I frames of the segment of data(Rate_(I)), the observed bitrate of the P frames of the segment of data(Rate_(P)) and the observed bitrate of the B frames of the segment ofdata (Rate_(B)) correspond to the number of total bits used to encodethe I frames of the segment of data, the number of bits used to encodethe P frames of the segment of data and the number of bits used toencode the B frames of the segment of data, respectively. TABLE 1illustrates some exemplary scaling factors (e.g., φ_(P) and φ_(B)) usedto scale the rates to a QP 33 equivalent. TABLE 2 illustrates someexemplary scaling factors used to scale the bitrate to its 30 fpsequivalent.

TABLE 1 Rate Scaling Factors Based on QP Frame QP Bitrate ScalingFactor, φ 28 0.517144638 − 0.003383 29 0.578015199 + 0.001467 300.690270107 − 0.002671 31 0.753518595 + 0.001542 32 0.860616347 +0.001733 33 1 34 1.099142284 + 0.000496 35 1.231770493 + 0.009451 361.531040155 − 0.031693 37 1.644054502 − 0.032849 38 1.853428794 −0.018959 39 2.115798762 − 0.061861 40 2.318844143 − 0.052601

TABLE 2 Rate Scaling Factors based on FPS Operating FPS Bitrate ScalingFactor, γFPS 30 1.0 24 1.142 15 1.43

Class selection module 46 associates the segment of data with one of theplurality of content classes based on the perceived quality metric (inthis case the weighted quality metric) as well as either one or moreencoding parameters that corresponds with the parameters used forgenerating the classes or a resultant bitrate of the encoded segment ofdata. As described above, the content classes may associate the segmentsof data with respective quality and rate information. For example, classselection module 46 may be configured with a plurality of quality-ratecurves that model a quality metric as a function of a bitrate. Thus, thequality-rate curves may comprise the content classes. The quality-ratecurves may be computed offline by measuring a bitrate and quality metricfor different types of content at different QPs, clustering the resultsand performing curve-fitting. For example, the quality-rate curves maymodeled using a logarithmic function of the form:

Q=α*1n(r)+β,   (7)

where Q is the quality metric, r is the bit rate, and α and β areconstants computed using a number of sample data points. As an example,the quality-rate curves may correspond to eight different classesassociated with varying levels of motion and texture in the content ofthe segments of data. TABLE 3 below illustrates some example constants αand β for the quality-rate curves illustrated in FIG. 3. Curve ID values0-7 correspond to curves 48A-48H (“curves 48”), respectively.

TABLE 3 Quality-rate Curve Constants Curve ID α β 0 5.0874 24.87129 15.1765 28.62093 2 5.9369 39.48376 3 5.2884 31.56214 4 5.3435 34.54844 55.1642 32.81238 6 5.0773 32.41378 7 5.0813 34.78407

To associate the segment of data with the corresponding quality-ratecurve (i.e., content class), class selection module 46 selects the oneof the quality-rate curves based on the perceived quality metric, e.g.,the weighted quality metric, and either one or more encoding parametersthat corresponds with the parameters used for generating the classes ora resultant bitrate of the encoded segment of data. Using a normalizedbitrate as an example, class selection module 46 may compute a qualitymetric for each of the quality rate curves corresponding to thenormalized bitrate. For example, class selection module 46 may computethe quality metric for each of the quality-rate curves in accordancewith equation (7), using the normalized bitrate computed by encodingparameter normalization module 44 and the quality-rate constantsspecified in TABLE 3. In other words, class selection module 46 computesthe quality metric for each of the quality-rate curves at the normalizedbitrate.

Class selection module 46 selects the quality-rate curve (i.e., class)that most closely corresponds with the segment of data. For example,class selection module 46 determines which of the quality metricscomputed using the normalized encoding parameters, e.g., bitrate, isclosest to the weighted quality metric computed by quality measurementmodule 42. Class selection module 46 may compute, for each of theplurality of quality-rate curves, a difference between the perceivedquality metric and a quality metric on the respective quality-rate curveat the normalized bitrate, and select the one of the quality-rate curvesthat corresponds to the smallest difference. Thus, class selectionmodule 46 selects the quality-rate curve that minimizes abs(Wt_Q−Q_(i)),where Wt_Q is the weighted quality metric and Q_(i) is the qualitymetric associated with the i^(th) class or curve.

FIG. 3 is a graph illustrating exemplary quality-rate curves 48 thatrepresent content classes. Quality-rate curves 48 illustrated in FIG. 3are modeled using the logarithmic function (6) and the quality-rateconstants illustrated in TABLE 3. As described above, quality-ratecurves 48 may be computed offline by measuring a bitrate and qualitymetric for different types of content encoded at different QPs,clustering the results and performing curve-fitting.

Each of quality-rate curves 48 corresponds to a different content classassociated with varying levels of motion and texture in the content ofthe segments of data. In particular, quality-rate curve 48A correspondsto low motion and low texture content. Quality-rate curve 48Hcorresponds to high motion and high texture content. Quality-rate curves48 illustrated in FIG. 3 are only exemplary curves. Similar curves maybe generated based on other quality-rate constants or other modelingequations.

FIG. 4 is a block diagram illustrating an exemplary quality controlmodule 50 that dynamically adjusts one or more encoding parameters usingto encode segments of data. Quality control module 50 may, for example,represent quality control module 24 of encoding device 12 (FIG. 1).Quality control module 50 includes a target quality determination module52, a quality comparison module 54 and an encoding parameter adjustmentmodule 56.

Target quality determination module 52 determines a target qualitymetric of the segment of data based on the content classification. Inother words, target quality determination module 52 determines a targetquality level at which encoding module 18 (FIG. 1) should encode thesegment of data. The target quality metric may, for example, comprise atarget PSNR at which to encode the segment of data. As described above,conventional PSNR is not always an accurate measurement of perceptualvideo quality as experienced by a viewer. Thus, target qualitydetermination module 52 may dynamically adjust the target quality metricbased on the content classification to account for the fact thatsequences of different content classes appear perceptually similar atdifferent PSNRs. Target quality determination module 52 may compute thedesired target quality metric using the equation:

Target_(—) Q=SetPoint+ΔQ _(i),   (8)

where Target_Q is the desired target quality metric, SetPoint is aninitial target quality metric, and ΔQi is the quality adjustment deltacorresponding with the ith content class. TABLE 4, below, showsexemplary quality adjustment deltas and desired target quality metrics(in this case PSNR) for a plurality of curves. The values computed inTABLE 4 are computed using a SetPoint PSNR of 33. As in TABLE 3 above,the curve ID values 0-7 may correspond to curves 48A-48H (“curves 48”)of FIG. 3.

TABLE 4 Desired Target PSNR for Setpoint of 33 Curved Id PSNR AdjustDelta Desired Target PSNR 0 3 36 1 3 36 2 2 35 3 1 34 4 0 33 5 −1 32 6−2 31 7 −3 30As illustrated in TABLE 4, the desired target PSNR for the curvescorresponding to low motion and low texture content is adjusted to behigher than the initial target quality (i.e., SetPoint) while thedesired target PSNR for the curves corresponding to high motion and hightexture content is adjusted to be lower than the initial target quality.In certain aspects, the initial target quality (i.e., SetPoint) maycorrespond to a quality metric associated with a medium motion, mediumtexture segment of data.

Quality comparison module 54 compares the computed target quality metricwith a perceived quality metric, which is the actual quality level atwhich the segment of data is encoded. In certain aspects, the perceivedquality metric may comprise the weighted quality metric computed byquality measurement module 42 (FIG. 2). Quality comparison module 54may, for example, receive the weighted quality metric from qualitymeasurement module 42. Alternatively, quality comparison module 54 maycompute the weighted quality metric as described in detail above withrespect to FIG. 2.

If the difference between the perceived quality metric, e.g., weightedquality metric, and the target quality metric exceeds a threshold value,quality comparison module 54 alerts encoding parameter adjustment module56. Encoding parameter adjustment module 56 then adjusts at least oneencoding parameter used to encode the segment of data. For example, ifthe perceived quality metric is greater than the desired target qualitymetric by a threshold, encoding parameter adjustment module 56 mayincrease the QP at which the segment of data is encoded. Likewise, ifthe perceived quality metric is less than the desired target qualitymetric by a threshold, encoding parameter adjustment module 56 maydecrease the QP at which the segment of data is encoded. QP encodingparameter adjustment module 56 may adjust the QP at which the segment ofdata is encoded (either up or down) by the difference between theperceived quality metric and the target quality metric. Alternatively,QP encoding parameter adjustment module 56 may adjust the QP at whichthe segment of data is encoded at finer increments when computationprocessing time permits. Although described herein in terms of adjustingQPs used to encode the segments of data, encoding parameter adjustmentmodule 56 may adjust other encoding parameters, such as frame rate,encoding modes, deblocking, coefficient trimming, motion vectorrefinement and the like.

Encoding parameter adjustment module 56 compares the adjusted encodingparameters with an acceptable range of encoding parameters (hereinafter,“acceptable encoding parameter range”). The acceptable encodingparameter range may differ based on the content class associated withthe segment of data. TABLE 5 shows exemplary acceptable encodingparameter ranges for QP values for the content classes associated withthe quality-rate curves illustrated in FIG. 3.

TABLE 5 Acceptable QP Ranges for SetPoint of 33 Curve ID Min QP Max QP 030 33 1 30 36 2 30 38 3 30 38 4 30 38 5 31 38 6 34 38 7 35 38

As illustrated in TABLE 5, the acceptable encoding parameter ranges varybased on the content class (e.g., quality-rate curve) associated withthe segment of data. In particular, the acceptable QP rangecorresponding to the content class corresponding to low motion and lowtexture content (e.g., curve ID 0) and the content class correspond tohigh motion and high texture content (e.g., curve ID 7) have a smallersized range of acceptable QP values than the content classes thatinclude medium texture and medium motion (e.g., curve IDs 2-4). Thecontent classes associated with the more extreme ends of the motion andtexture content have ranges of only four acceptable QP values, whereasthe content classes associated with more medium motion and texture haveranges of up to nine acceptable QP values.

Moreover, TABLE 5 also illustrates an additional relationship betweenthe QP and the content. The acceptable QP range of content of thesegment of data that includes high motion and high texture content ishigher than the acceptable QP range of content of the segment of datathat includes low motion and low texture. As illustrated in TABLE 5,there is a difference of five QP values between the high motion, hightexture content and the low motion, low texture content.

If encoding parameter adjustment module 56 determines that the adjustedencoding parameter are outside of the range of acceptable encodingparameters, encoding parameter adjustment module 56 re-adjusts theencoding parameter to be within the acceptable encoding parameter range.If the adjusted QP value for a segment of data that corresponds to curveID 0 is equal to twenty-eight, for example, encoding parameteradjustment module 56 may re-adjust the QP value for the segment of datato thirty, which is within the acceptable QP range for the content classcorresponding to quality-rate curve ID 0.

Quality control module 50 provides the adjusted encoding parameters toencoding module 18 (FIG. 1). Encoding module 18 may perform a secondpass encoding on the segment of data using the adjusted encodingparameters if sufficient processing time permits. In this manner,quality control module 50 dynamically adjusts the perceived quality atwhich the segments of data are encoded in an attempt to maintain aconstant quality. Moreover, encoding module 18 may use the adjustedencoding parameters to encode a subsequent segment of data. This is trueeven if encoding module 18 does not re-encode the previous segment ofdata.

FIG. 5 is a diagram illustrating an exemplary encoding technique forencoding segments of data in accordance with techniques of thisdisclosure. The encoding techniques illustrated in FIG. 5 may, forexample, be performed by encoding device 12 (FIG. 1). The exampleillustrated in FIG. 5 shows encoding of segments of data 60A and 60B.However, the techniques may be extended to any number of segments ofdata.

Initially, encoding device 12 may perform a first pass to encode segmentof data 60A using an initial set of encoding parameters. Encoding device12 may, for example, initially encode segment of data 60A using aconfigured QP or a QP determined based on the content, or properties, ofsegment of data 60A. As described in detail above, encoding device 12analyzes the content of the encoded segment of data to associate segmentof data 60A with one of a plurality of content classes and determineswhether to adjust one or more encoding parameters based on a perceivedquality metric of the encoded segment of data and a target qualitymetric corresponding to the associated content class. Encoding device 12may, for example, determine that an adjustment is desired when thedifference between the perceived quality metric and the target qualitymetric exceeds a threshold.

When an adjustment is desired, encoding device 12 adjusts at least oneencoding parameter for segment of data 60A and performs a second pass toencode of segment of data 60A using the adjusted encoding parameters.The second pass encoding effectively refines the perceived qualitymetric towards the desired target quality metric, and may re-establishthe content class of the video sequence. Although only two encodingpasses are performed in the example illustrated in FIG. 5, encodingdevice 12 may perform more than two encoding passes when computingprocess time permits. Moreover, if processing time does not permit,encoding device 12 may not re-encode the segment of data using theadjusted encoding parameters, but instead use the adjusted encodingparameters to encode the subsequent segment of data, i.e., segment ofdata 60B. Encoding device 12 transmits encoded segment of data 60A.

Encoding device 12 may perform a first pass encode of segment of data60B using the encoding parameters that were used to encode segment ofdata 60A during the second pass encoding. If no second coding pass wasperformed on segment of data 60A, encoding device 12 may perform thefirst pass encode segment of data 60B using the encoding parameters thatwere used to during the first pass encode of segment of data 60A.Alternatively, encoding device 12 may encode segment of data 60B usingthe adjusted encoding parameters computed for the segment of data 60Aeven though no re-encoding of segment of data 60A was performed. In thismanner, encoding device 12 operates under the heuristic that the contentis similar between two consecutive segments of data.

Encoding device 12 again analyzes the content of the encoded segment ofdata to associate segment of data 60B with one of a plurality of contentclasses, determines whether to adjust the encoding parameters based on aperceived quality metric of the encoded segment of data and a targetquality metric corresponding to the associated content class, andadjusts at least one encoding parameter for segment of data 60B when theadjustment is desired. Encoding device 12 then performs a second passencoding of segment of data 60B using the adjusted encoding parameters,which again refines the perceived quality metric towards the desiredtarget quality metric.

FIG. 6 is a flow diagram illustrating exemplary operation of encodingdevice 12 controlling the quality of encoded segments of data inaccordance with techniques of this disclosure. Initially, encodingmodule 18 encodes the segment of data using an initial set of encodingparameters (70). Encoding module 18 may, for example, encode the segmentof data using adjusted encoding parameters computed for the previoussegment of data. These adjusted encoding parameters may or may not bethe encoding parameters used to encode the previous segment of data. Forexample, if processing time did not permit, the previous segment of datamay be encoded using different encoding parameters. In this manner,encoding module 18 may operate under the heuristic that the contentclass is similar between two consecutive segments of data.Alternatively, encoding module 18 may be configured to initially encodeall segments of data using configured encoding parameters. In anotherexample, encoding module 18 may select initial encoding parameters atwhich to encode the segments of data based on the content, orproperties, of the segment of data.

Encoding device 12 computes a perceived quality metric of the encodedsegment of data (72). In certain aspects, encoding device 12 may computea weighted quality metric associated with the encoded segment of datathat provides an objective video quality metric that is closer to thesubjective quality as experienced by a viewer than conventional qualitymetrics. As described in detail above, encoding device 12 may computethe weighted quality metric by separating blocks of pixels of one ormore frames of data associated with the segment into groups based on oneor more difference metrics associated with each of the blocks of pixels,associating quality metrics and weights with each of the groups ofblocks of pixels, and computing the weighted quality metric based on thenumber of blocks of pixels in each group as well as the quality metricsand weights associated with the groups.

Content classification module 22 associates the segment of data with oneof a plurality of content classes (74). In certain aspects, the contentclasses may comprise one or more curves that model a quality metric,such as peak signal to noise ratio (PSNR), as a function of a bitrate.Content classification module 22 may select the one of the curves thatmost closely corresponds to the encoded segment of data based on theperceived quality metric and at least one of the encoding parameters(e.g., bitrate, QP, or the like) used to encode the segment of data. Toassist in the association of the segment of data with one of the contentclasses, content classification module 22 may compute one or morenormalized encoding parameters at which the segment of data was encodedto correspond to the parameters used to generate the quality-rate curveswhen the encoding parameters used to encode the segment of data aredifferent than the encoding parameters used to generate the plurality ofquality-rate curves. Content classification module 22 may then associatethe segment of data with one of the content classes based on theperceived quality metric and the normalized encoding parameters. Forexample, content classification module 22 may select the quality-ratecurve that has a quality metric at a normalized bitrate that is closestto the computed weighted quality metric. Alternatively, contentclassification module 22 may select the one of the curves that mostclosely corresponds to the encoded segment of data based on theperceived quality metric and a resultant bitrate of the encoded segmentof data (i.e., a bitrate achieved using a particular set of encodingparameters).

Quality control module 24 determines a target quality metric associatedwith the content class to which the segment of data belongs (76).Quality control module 24 may, for example, compute the target qualitymetric using equation (8) and the parameters of TABLE 4 for a set pointof a PSNR value of 33. Quality control module 24 computes a differencebetween the weighted quality metric to the target quality metric (78)and compares the absolute value of the difference to a threshold (80).In other words, quality control module 24 determines whether theobserved quality is sufficient. If the absolute value of the differenceis less than the threshold, encoding device 12 does not need to performa second pass to re-encode, and instead simply transmits the segment ofdata (82).

If the absolute value of the difference between the weighted qualitymetric and the target quality metric exceeds the threshold, qualitycontrol module 24 adjusts at least one encoding parameter used forencoding the segment of data (84). For example, if the perceived qualitymetric is greater than the target quality metric by the threshold,quality control module 24 may increase a QP used for encoding. Likewise,if the perceived quality metric is less than the target quality metricby the threshold, quality control module 24 may decreases the QP usedfor encoding.

Encoding parameter adjustment module 56 determines whether the adjustedencoding parameter is within an acceptable range of parameters (86).Encoding parameter adjustment module 56 may compare the adjustedencoding parameter with the acceptable encoding parameter rangeassociated with the segment of data, such as the QP ranges specified inTABLE 5. As described above, the acceptable encoding parameter range maydiffer based on the content class associated with the segment of data.If the adjusted encoding parameter is outside of the acceptable encodingparameter range, encoding parameter adjustment module 56 re-adjusts theencoding parameter to be within the acceptable encoding parameter range(87).

Quality control module 24 determines whether there is sufficient time tore-encode the segment of data (88). In one aspect, quality controlmodule 24 may determine whether there is sufficient computer processingtime left to re-encode the segment of data. In another aspect, qualitycontrol module 24 may determine the number of times the current segmentof data has been re-encoded and not adjust the encoding parameters afterthe segment of data has been re-encoded more than a threshold number oftimes. In one example, the threshold number of times which the segmentof data may be re-encoded is one.

If there is sufficient time to re-encode the segment of data, encodingmodule 18 performs a second pass to re-encode the segment of data usingthe adjusted encoding parameters, e.g., the adjusted QP (89). The secondpass of encoding effectively refines the perceived quality metrictowards the desired target quality metric, and may re-establish thecontent class of the video sequence. In some aspects, encoding module 24may perform more than two encoding passes in an attempt to refine theobserved quality. After the second pass re-encode, encoding device 12computes a perceived quality metric of the re-encoded segment of data(72). If there is not sufficient time to re-encode the segment of data,encoding device 12 does not need to perform a second pass to re-encode,and instead simply transmits the segment of data (82).

FIG. 7 is a flow diagram illustrating exemplary operation of qualitymeasurement module 42 computing a weighted quality metric in accordancewith the techniques of certain aspects of this disclosure. As describedin detail above, the weighted quality metric may provide an objectivevideo quality metric that more closely resembles the subjective qualityas perceived by a viewer than conventional quality metrics.

Quality measurement module 42 generates a plurality of groups (90). Asdescribed in detail above, the groups may correspond to one or moredifference metrics, such as SPPs, SADs, SSDs SATDs, SSTDs or the like.In one example, quality measurement module 42 may generate sixty-fourgroups that each correspond to four difference metrics. Qualitymeasurement module 42 pre-computes one or more characteristicsassociated with each of the groups (92). Quality measurement module maypre-compute a quality metric, e.g., a PSNR value, associated with eachof the groups. For instance, quality measurement module 42 maypre-compute the quality metrics by averaging the PSNR values associatedwith each of the difference metrics belonging to the groups.Additionally, quality measurement module 42 may pre-compute a weightassociated with each of the groups. For example, quality measurementmodule 42 may pre-compute the weights using a logarithmic weightfunction that assigns higher weights to the groups which have higherdifference metrics, e.g., higher SPP values.

Quality measurement module 42 computes a difference metric for a blockof pixels of the segment of data (94). Quality measurement module 42computes the same difference metric that was used to form the groups.For example, if the groups are generated based on SPP values, qualitymeasurement module 42 may compute SPP values for the block of pixelsusing equation 1 above. Quality measurement module 42 associates theblock of pixels with one of the groups based on the computed differencemetric (96). Quality measurement module 42 may compare the qualitymetric of the block of pixels with the quality metrics of the groups,and associate the block of pixels with the group that corresponds withthe same quality metric value. Quality measurement module 42 determineswhether there are any other blocks of pixels in the segment of data(98). Quality measurement module 42 continues to associate each of theblocks of pixels with a group until all the blocks of pixels have beengrouped. In this manner, quality measurement module 42 separates theblocks of pixels of the segment of data into one of the groups based onthe quality metrics associated with the blocks of pixels.

When quality measurement module 42 has associated all of the blocks ofpixels of the segment of data with one of the groups, qualitymeasurement module 42 computes a percentage of blocks of pixels that areincluded in one of the groups (100). Quality measurement module 42 maycompute the percentage by dividing the number of blocks of pixelsassociated with the group by the total number of blocks of pixels of thesegment of data. In certain aspects, quality measurement module 42 maycompute the percentages without including skip blocks of pixels. Qualitymeasurement module 42 computes an adjusted block count for the group bymultiplying the percentage of blocks of pixels in the group by thepre-computed weight associated with the group (102). Quality measurementmodule 42 determines whether there are any more groups (104), andcomputes percentage of blocks of pixels and adjusted block counts foreach of the groups.

After computing the adjust block count for each of the groups, qualitymeasurement module 42 computes the weighted quality metric for thesegment of data (106). For example, quality measurement module 42 maycompute the weighted quality metric for the segment of data based on theadjusted block counts and the quality metrics associated with thegroups. In one example, quality measurement module computes the weightedquality metric according to the equation:

Wt_(—) Q=Σ(Adjusted_block_cnt[i]*Group_(—) Q[i])/TotalMBCnt,   (9)

where Wt_Q is the weighted quality metric, i=0, 1, . . . , n, n is equalto the number of pixels in each of the frames associated with thesegment of data, Adjusted block_cnt[i] is the adjusted block countassociated with the i^(th) group, Group_Q[i] is the quality metricassociated with the i^(th) group, and TotalMBCnt is a total number ofblocks of pixels in the segment of data. By computing a quality metricfor the segment of data in the manner described above, an objectivevideo quality metric can be defined that is closer to the subjectivequality experienced by a viewer relative to conventional techniques.

FIG. 8 is a flow diagram illustrating exemplary operation of contentclassification module 40 associating the segment of data with one of aplurality of content classes in accordance with the techniques ofcertain aspects of this disclosure. Initially, content classificationmodule 40 normalizes one or more encoding parameters used to encode thesegment of data to correspond with the parameters used to generate thecontent classes (110). For example, content classification module 40 maynormalize a bitrate in accordance with equation (6) and the scalingfactors included in TABLES 1 and 2.

Content classification module 40 computes a quality metric for each ofthe quality-rate curves using the normalized encoding parameters (112).For example, content classification module 40 may compute the qualitymetric for each of the quality-rate curves using the logarithmicfunction of equation (7) and the constants given in TABLE 3 along with anormalized bitrate.

Content classification module 40 associates the segment of data with oneof the quality-rate curves (114). Content classification module 40 mayassociate the segment of data with one of the quality-rate curves basedon the quality metrics of the quality-rate curves at the normalizedbitrate and weighted quality metric of the encoded segment of data. Inparticular, content classification module 40 compares the qualitymetrics of the quality-rate curves computed at the normalized bitrate tothe weighted quality metric and selects the quality-rate curve thatcorresponds to the quality metric that is closest to the weightedquality metric. In this manner, content classification module 40associates the segment of data with the quality-rate curve thatminimizes abs(Wt_Q−Q_(i)), where Wt_Q is the weighted quality metric andQ_(i) is the quality metric associated with the i^(th) class or curve.

Based on the teachings described herein, one skilled in the art shouldappreciate that an aspect disclosed herein may be implementedindependently of any other aspects and that two or more of these aspectsmay be combined in various ways. The techniques described herein may beimplemented in hardware, software, firmware, or any combination thereof.If implemented in hardware, the techniques may be realized using digitalhardware, analog hardware or a combination thereof. If implemented insoftware, the techniques may be realized at least in part by acomputer-program product that includes a computer readable medium onwhich one or more instructions or code is stored.

By way of example, and not limitation, such computer-readable media cancomprise RAM, such as synchronous dynamic random access memory (SDRAM),read-only memory (ROM), non-volatile random access memory (NVRAM), ROM,electrically erasable programmable read-only memory (EEPROM), EEPROM,FLASH memory, CD-ROM or other optical disk storage, magnetic diskstorage or other magnetic storage devices, or any other tangible mediumthat can be used to carry or store desired program code in the form ofinstructions or data structures and that can be accessed by a computer.

The instructions or code associated with a computer-readable medium ofthe computer program product may be executed by a computer, e.g., by oneor more processors, such as one or more digital signal processors(DSPs), general purpose microprocessors, application specific integratedcircuits (ASICs), field programmable logic arrays (FPGAs), or otherequivalent integrated or discrete logic circuitry.

A number of aspects and examples have been described. However, variousmodifications to these examples are possible, and the principlespresented herein may be applied to other aspects as well. These andother aspects are within the scope of the following claims.

1. A method for processing digital multimedia data, the methodcomprising: encoding a segment of data associated with the digitalmultimedia data using a set of encoding parameters; analyzing one ormore properties of the encoded segment of data to associate the segmentof data with one of a plurality of content classes; adjusting at leastone of the encoding parameters used to encode the segment of data basedat least on a perceived quality metric of the encoded segment of dataand a target quality metric, which corresponds to the associated contentclass; and re-encoding the segment of data using the adjusted encodingparameters.
 2. The method of claim 1, wherein adjusting the at least oneof the encoding parameters comprises adjusting at least one of theencoding parameters when a difference between the perceived qualitymetric and the target quality metric exceeds a threshold.
 3. The methodof claim 1, wherein adjusting the at least one of the encodingparameters comprises increasing a quantization parameter when theperceived quality metric is greater than the target quality metric by athreshold.
 4. The method of claim 3, wherein increasing the quantizationparameter comprises increasing the quantization parameter by an absolutevalue of a difference between the perceived quality metric and thetarget quality metric.
 5. The method of claim 1, wherein adjusting theat least one of the encoding parameters comprises decreasing aquantization parameter when the perceived quality metric is less thanthe target quality metric by a threshold.
 6. The method of claim 5,wherein decreasing the quantization parameter comprises decreasing thequantization parameter by an absolute value of a difference between theperceived quality metric and the target quality metric.
 7. The method ofclaim 1, further comprising: comparing the adjusted at least one of theencoding parameters to an acceptable range for the at least one of theencoding parameters for the content class associated with the segment ofdata; and re-adjusting the at least one of the encoding parameters to bea value within the acceptable range for the at least one of the encodingparameters when the adjusted encoding parameter is outside theacceptable range for the at least one of the encoding parameters.
 8. Themethod of claim 1, further comprising: identifying an initial targetquality set point; and adjusting the initial target quality set pointbased on the content class associated with the segment of data tocompute the target quality metric for the segment of data.
 9. The methodof claim 1, wherein encoding the segment of data comprises encoding thesegment of data using a previous set of adjusted encoding parameterscomputed for a previous segment of data.
 10. The method of claim 1,wherein analyzing the one or more properties of the encoded segment ofdata comprises: normalizing at least one of the one or more propertiesof the encoded segment of data to correspond with encoding parametersused to generate a plurality of quality-rate curves when the encodingparameters used to encode the segment of data are different than theencoding parameters used to generate the plurality of quality-ratecurves; computing the perceived quality metric of the encoded segment ofdata; and selecting one of the plurality of quality-rate curves based onthe perceived quality metric and one of the at least one of the encodingparameters used to encode the segment of data, the at least onenormalized property, and a resultant bitrate of the encoded segment ofdata.
 11. The method of claim 10, wherein selecting one of the pluralityof quality-rate curves comprises: computing, for each of the pluralityof quality-rate curves, a difference between the perceived qualitymetric and a quality metric on the respective quality-rate curvecorresponding to the at least one normalized property; and selecting theone of the quality-rate curves that corresponds to a smallest differenceof the computed differences.
 12. The method of claim 10, whereincomputing the perceived quality metric further comprises: separatingblocks of pixels of frames of data associated with the segment intogroups based on at least one difference metric associated with each ofthe blocks of pixels; associating quality metric values and weightvalues with each of the groups of blocks of pixels; and computing aweighted quality metric for the segment of data based on the qualitymetric values and weight values associated with of the groups.
 13. Themethod of claim 12, wherein separating blocks of pixels into groupsbased on at least one difference metric comprises separating blocks ofpixels into groups based on at least one of a sum of absolute difference(SAD), SAD per pixel (SPP), sum of squared differences (SSD), sum ofabsolute transformed difference (SATD), and sum of squared transformeddifference (SSTD).
 14. The method of claim 1, wherein analyzing the oneor more properties of the encoded segment of data to associate thesegment of data with one of a plurality of content classes comprisesanalyzing the one or more properties of the encoded segment of data toassociate the segment of data with a certain one of a plurality ofquality-rate curves.
 15. An apparatus for processing digital multimediadata, the apparatus comprising: an encoding module that encodes asegment of data associated with the digital multimedia data using a setof encoding parameters; a content classification module that analyzesone or more parameters of the encoded segment of data to associate thesegment of data with one of a plurality of content classes; and aquality control module that adjusts at least one of the encodingparameters used to encode the segment of data based at least on aperceived quality metric of the encoded segment of data and a targetquality metric, which corresponds to the associated content class,wherein the encoding module re-encodes the segment of data using theadjusted encoding parameter.
 16. The apparatus of claim 15, wherein thequality control module adjusts the at least one of the encodingparameters when a difference between the perceived quality metric andthe target quality metric exceeds a threshold.
 17. The apparatus ofclaim 15, wherein the quality control module increases a quantizationparameter when the perceived quality metric is greater than the targetquality metric by a threshold.
 18. The apparatus of claim 17, whereinthe quality control module increases the quantization parameter by anabsolute value of a difference between the perceived quality metric andthe target quality metric.
 19. The apparatus of claim 15, wherein thequality control module decreases a quantization parameter when theperceived quality metric is less than the target quality metric by athreshold.
 20. The apparatus of claim 19, wherein the quality controlmodule decreases the quantization parameter by an absolute value of adifference between the perceived quality metric and the target qualitymetric.
 21. The apparatus of claim 15, wherein the quality controlmodule: compares the adjusted at least one of the encoding parameters toan acceptable range for the at least one of the encoding parameters forthe content class associated with the segment of data; and re-adjuststhe at least one of the encoding parameters to a value within theacceptable range for the at least one of the encoding parameters whenthe adjusted encoding parameter is outside the acceptable range for theat least one of the encoding parameters.
 22. The apparatus of claim 15,wherein the quality control module: identifies an initial target qualityset point; and adjusts the initial target quality set point based on thecontent class associated with the segment of data to compute the targetquality metric for the segment of data.
 23. The apparatus of claim 15,wherein the encoding module encodes the segment of data using a previousset of adjusted encoding parameters computed for a previous segment ofdata.
 24. The apparatus of claim 15, wherein the content classificationmodule: normalizes at least one of the one or more properties of theencoded segment of data to correspond with encoding parameters used togenerate a plurality of quality-rate curves when the encoding parametersused to encode the segment of data are different than the encodingparameters used to generate the plurality of quality-rate curves;computes the perceived quality metric of the encoded segment of data;and selects one of the plurality of quality-rate curves based on theperceived quality metric and one of the at least one of the encodingparameters used to encode the segment of data, the at least onenormalized property, and a resultant bitrate of the encoded segment ofdata.
 25. The apparatus of claim 24, wherein the content classificationmodule: computes, for each of the plurality of quality-rate curves, adifference between the perceived quality metric and a quality metric onthe respective quality-rate curve corresponding to the at least onenormalized property; and selects the one of the quality-rate curves thatcorresponds to a smallest difference of the computed differences. 26.The apparatus of claim 24, wherein the content classification module:separates blocks of pixels of frames of data associated with the segmentinto groups based on at least one difference metric associated with eachof the blocks of pixels; associates quality metric values and weightvalues with each of the groups of blocks of pixels; and computes aweighted quality metric for the segment of data based on the qualitymetric values and weight values associated with of the groups.
 27. Theapparatus of claim 26, wherein the content classification moduleseparates the blocks of pixels into groups based on at least one of asum of absolute difference (SAD), SAD per pixel (SPP), sum of squareddifferences (SSD), sum of absolute transformed difference (SATD), andsum of squared transformed difference (SSTD).
 28. The apparatus of claim15, wherein the content classification module analyzes the one or moreproperties of the encoded segment of data to associate the segment ofdata with a certain one of a plurality of quality-rate curves.
 29. Anapparatus for processing digital multimedia data, the apparatuscomprising: means for encoding a segment of data associated with thedigital multimedia data using a set of encoding parameters; means foranalyzing one or more properties of the encoded segment of data toassociate the segment of data with one of a plurality of contentclasses; means for adjusting at least one of the encoding parametersused to encode the segment of data based at least on a perceived qualitymetric of the encoded segment of data and a target quality metric, whichcorresponds to the associated content class; and means for re-encodingthe segment of data using the adjusted encoding parameter.
 30. Theapparatus of claim 29, wherein the means for adjusting the at least oneof the encoding parameters comprises means for adjusting at least one ofthe encoding parameters when a difference between the perceived qualitymetric and the target quality metric exceeds a threshold.
 31. Theapparatus of claim 29, wherein the means for adjusting the at least oneof the encoding parameters comprises means for increasing a quantizationparameter when the perceived quality metric is greater than the targetquality metric by a threshold.
 32. The apparatus of claim 31, whereinthe means for increasing includes means for increasing the quantizationparameter by an absolute value of a difference between the perceivedquality metric and the target quality metric.
 33. The apparatus of claim29, wherein the means for adjusting the at least one of the encodingparameters comprises means for decreasing a quantization parameter whenthe perceived quality metric is less than the target quality metric by athreshold.
 34. The apparatus of claim 33, wherein the means fordecreasing includes means for decreasing the quantization parameter byan absolute value of a difference between the perceived quality metricand the target quality metric.
 35. The apparatus of claim 29, furthercomprising: means for comparing the adjusted at least one of theencoding parameters to an acceptable range for the at least one of theencoding parameters for the content class associated with the segment ofdata; and means for re-adjusting the at least one of the encodingparameters to a value within the acceptable range for the at least oneof the encoding parameters when the adjusted encoding parameter isoutside the acceptable range for the at least one of the encodingparameters.
 36. The apparatus of claim 29, further comprising: means foridentifying an initial target quality set point; and means for adjustingthe initial target quality set point based on the content classassociated with the segment of data to compute the target quality metricfor the segment of data.
 37. The apparatus of claim 29, wherein themeans for encoding the segment of data comprises means for encoding thesegment of data using a previous set of adjusted encoding parameterscomputed for a previous segment of data.
 38. The apparatus of claim 29,wherein the analyzing means further comprises: means for normalizing atleast one of the encoding parameters used to encode the segment of datato correspond with encoding parameters used to generate a plurality ofquality-rate curves when the encoding parameters used to encode thesegment of data are different than the encoding parameters used togenerate the plurality of quality-rate curves; means for computing theperceived quality metric of the encoded segment of data; and means forselecting one of the plurality of quality-rate curves based on theperceived quality metric and one of at least one of the encodingparameters used to encode the segment of data, the normalized encodingparameters, and a resultant bitrate of the encoded segment of data. 39.The apparatus of claim 38, wherein the selecting means computes, foreach of the plurality of quality-rate curves, a difference between theperceived quality metric and a quality metric on the respectivequality-rate curve corresponding to the normalized encoding parameterand selects the one of the quality-rate curves that corresponds to thesmallest difference.
 40. The apparatus of claim 38, wherein thecomputing means separates blocks of pixels of frames of data associatedwith the segment into groups based on at least one difference metricassociated with each of the blocks of pixels, associates quality metricvalues and weight values with each of the groups of blocks of pixels,and computes a weighted quality metric for the segment of data based onthe quality metric values and weight values associated with of thegroups.
 41. The apparatus of claim 40, wherein the computing meansseparates blocks of pixels into groups based on at least one of a sum ofabsolute difference (SAD), SAD per pixel (SPP), sum of squareddifferences (SSD), sum of absolute transformed difference (SATD), andsum of squared transformed difference (SSTD).
 42. The apparatus of claim29, wherein the analyzing means analyzes content of the encoded segmentof data to associate the segment of data with one of a plurality ofquality-rate curves.
 43. A machine readable medium having instructionsstored thereon, the stored instructions including one or more segmentsof code, and being executable on one or more machines, the one or moresegments of code comprising: code for encoding a segment of dataassociated with the digital multimedia data using a set of encodingparameters; code for analyzing one or more properties of the encodedsegment of data to associate the segment of data with one of a pluralityof content classes; code for adjusting at least one of the encodingparameters used to encode the segment of data based at least on aperceived quality metric of the encoded segment of data and a targetquality metric, which corresponds to the associated content class; andcode for re-encoding the segment of data using the adjusted encodingparameter.
 44. The machine readable medium of claim 43, wherein the codefor adjusting the at least one encoding parameter comprises code foradjusting at least one of the encoding parameters when a differencebetween the perceived quality metric and the target quality metricexceeds a threshold.
 45. The machine readable medium of claim 43,wherein the code for adjusting the at least one of the encodingparameters comprises code for increasing a quantization parameter whenthe perceived quality metric is greater than the target quality metricby a threshold.
 46. The machine readable medium of claim 45, wherein thecode for increasing the quantization parameter comprises code forincreasing the quantization parameter by an absolute value of adifference between the perceived quality metric and the target qualitymetric.
 47. The machine readable medium of claim 43, wherein the codefor adjusting the at least one of the encoding parameters comprises codefor decreasing a quantization parameter when the perceived qualitymetric is less than the target quality metric by a threshold.
 48. Themachine readable medium of claim 47, wherein the code for decreasing thequantization parameter comprises code for decreasing the quantizationparameter by an absolute value of a difference between the perceivedquality metric and the target quality metric.
 49. The machine readablemedium of claim 43, further comprising: code for comparing the adjustedat least one of the encoding parameters to an acceptable range for theat least one of the encoding parameters for the content class associatedwith the segment of data; and code for re-adjusting the at least one ofthe encoding parameters to a value within the acceptable range for theat least one of the encoding parameters when the adjusted encodingparameter is outside the acceptable range for the at least one of theencoding parameters.
 50. The machine readable medium of claim 43,further comprising: code for identifying an initial target quality setpoint; and code for adjusting the initial target quality set point basedon the content class associated with the segment of data to compute thetarget quality metric for the segment of data.
 51. The machine readablemedium of claim 43, wherein the code for encoding the segment of datacomprises code for encoding the segment of data using a previous set ofadjusted encoding parameters computed for a previous segment of data.52. The machine readable medium of claim 43, wherein the code foranalyzing the one or more properties of the encoded segment of datacomprises: code for normalizing at least one of the one or moreproperties of the encoding parameters used to encode the segment of datato correspond with encoding parameters used to generate a plurality ofquality-rate curves when the encoding parameters used to encode thesegment of data are different than the encoding parameters used togenerate the plurality of quality-rate curves; code for computing theperceived quality metric of the encoded segment of data; and code forselecting one of the plurality of quality-rate curves based on theperceived quality metric and one of the at least one of the encodingparameters used to encode the segment of data, the at least onenormalized property, and a resultant bitrate of the encoded segment ofdata.
 53. The machine readable medium of claim 52, wherein the code forselecting one of the plurality of quality-rate curves comprises: codefor computing, for each of the plurality of quality-rate curves, adifference between the perceived quality metric and a quality metric onthe respective quality-rate curve corresponding to the at least onenormalized property; and code for selecting the one of the quality-ratecurves that corresponds to a smallest difference of the computeddifferences.
 54. The machine readable medium of claim 52, wherein thecode for computing the perceived quality metric further comprises: codefor separating blocks of pixels of frames of data associated with thesegment into groups based on at least one difference metric associatedwith each of the blocks of pixels; code for associating quality metricvalues and weight values with each of the groups of blocks of pixels;and code for computing a weighted quality metric for the segment of databased on the quality metric values and weight values associated with ofthe groups.
 55. The machine readable medium of claim 54, wherein thecode for separating blocks of pixels into groups based on at least onedifference metric comprises code for separating blocks of pixels intogroups based on at least one of a sum of absolute difference (SAD), SADper pixel (SPP), sum of squared differences (SSD), sum of absolutetransformed difference (SATD), and sum of squared transformed difference(SSTD).
 56. The machine readable medium of claim 43, wherein the codefor analyzing the one or more properties of the encoded segment of datato associate the segment of data with one of a plurality of contentclasses comprises code for analyzing the one or more properties of theencoded segment of data to associate the segment of data with one of aplurality of quality-rate curves.
 57. A method for processing multimediadata, the method comprising: computing a perceived quality metric for anencoded segment of data associated with digital multimedia data; andselecting one of a plurality of content classes based on the perceivedquality metric and one of at least one encoding parameter used to encodethe segment of data and a resultant bitrate of the encoded segment ofdata.
 58. The method of claim 57, further comprising normalizing atleast one of the encoding parameters used to encode the segment of datato correspond with encoding parameters used to generate the plurality ofcontent classes.
 59. The method of claim 58, wherein the content classescomprise quality-rate curves, the method further comprising: computing,for each of the quality-rate curves, a difference between the perceivedquality metric and a quality metric on the respective quality-rate curvecorresponding to the normalized encoding parameter; and selecting acertain one of the plurality of quality-rate curves that is associatedwith a smallest difference of the computed differences.
 60. The methodof claim 57, wherein the plurality of content classes comprises aplurality of quality-rate curves, and selecting the one of the pluralityof content classes includes selecting a certain one of the plurality ofquality-rate curves.
 61. The method of claim 57, wherein computing theperceived quality metric further includes: separating blocks of pixelsof frames of data associated with the encoded segment into groups basedon at least one difference metric associated with each of the blocks ofpixels; associating quality metric values and weight values with each ofthe groups of blocks of pixels; and computing a weighted quality metricfor the encoded segment of data based on the quality metric values andweight values associated with of the groups.
 62. The method of claim 61,wherein separating the blocks of pixels into groups based on at leastone difference metric includes separating the blocks of pixels intogroups based on at least one of a sum of absolute difference (SAD), SADper pixel (SPP), sum of squared differences (SSD), sum of absolutetransformed difference (SATD), and sum of squared transformed difference(SSTD).
 63. The method of claim 61, wherein separating the blocks ofpixels into groups based on at least one difference metric includes:separating possible difference metrics into groups, wherein at least aportion of the groups include two or more difference metrics;pre-computing quality metrics associated with each of the groups,wherein the quality metrics for the groups is equal to an average ofquality metrics corresponding to each of the difference metricsassociated with the groups; and pre-computing weights for each of thegroups, wherein the weights for each of the groups are computed based onat least a portion of the difference metrics associated with the bins.64. The method of claim 57, wherein computing the perceived qualitymetric of the encoded segment of data includes computing an observedpeak signal to noise ratio (PSNR) of the encoded segment of data.
 65. Anapparatus for processing multimedia data, the apparatus comprising: aquality measurement module that computes a perceived quality metric foran encoded segment of data associated with digital multimedia data; anda class selection module that selects one of a plurality of contentclasses based on the perceived quality metric and one of at least oneencoding parameter used to encode the segment of data and a resultantbitrate of the encoded segment of data.
 66. The apparatus of claim 65,further comprising an encoding parameter normalization module thatnormalizes at least one of the encoding parameters used to encode thesegment of data to correspond with encoding parameters used to generatethe plurality of content classes.
 67. The apparatus of claim 66, whereinthe plurality of content classes comprises a plurality of quality-ratecurves, and the class selection module also: computes, for each of thequality-rate curves, a difference between the perceived quality metricand a quality metric on the respective quality-rate curve correspondingto the normalized encoding parameter; and selects a certain one of theplurality of quality-rate curves that is associated with a smallestdifference of the computed differences.
 68. The apparatus of claim 65,wherein the plurality of content classes comprises a plurality ofquality-rate curves, and the class selection module selects a certainone of the plurality of quality-rate curves.
 69. The apparatus of claim65, wherein the quality measurement module further: separates blocks ofpixels of frames of data associated with the segment into groups basedon at least one difference metric associated with each of the blocks ofpixels; associates quality metric values and weight values with each ofthe groups of blocks of pixels; and computes a weighted quality metricfor the segment of data based on the quality metric values and weightvalues associated with of the groups.
 70. The apparatus of claim 69,wherein the quality measurement module also separates the blocks ofpixels into groups based on at least one of a sum of absolute difference(SAD), SAD per pixel (SPP), sum of squared differences (SSD), sum ofabsolute transformed difference (SATD), and sum of squared transformeddifference (SSTD).
 71. The apparatus of claim 69, wherein the qualitymeasurement module further: separates possible difference metrics intogroups, wherein at least a portion of the groups include two or moredifference metrics; pre-computes quality metrics associated with each ofthe groups, wherein the quality metrics for the groups is equal to anaverage of quality metrics corresponding to each of the differencemetrics associated with the groups; and pre-computes weights for each ofthe groups, wherein the weights for each of the groups are computedbased on at least a portion of the difference metrics associated withthe bins.
 72. The apparatus of claim 65, wherein the quality measurementmodule also computes an observed peak signal to noise ratio (PSNR) ofthe encoded segment of data.
 73. An apparatus for processing multimediadata, the apparatus comprising: means for computing a perceived qualitymetric for an encoded segment of data associated with digital multimediadata; and means for selecting one of a plurality of content classesbased on the perceived quality metric and one of at least one encodingparameter used to encode the segment of data and a resultant bitrate ofthe encoded segment of data.
 74. The apparatus of claim 73, furthercomprising means for normalizing at least one of the encoding parametersused to encode the segment of data to correspond with encodingparameters used to generate the plurality of content classes.
 75. Theapparatus of claim 74, wherein the plurality of content classescomprises a plurality of quality-rate curves, and further comprising:means for computing, for each of the quality-rate curves, a differencebetween the perceived quality metric and a quality metric on therespective quality-rate curve corresponding to the normalized encodingparameter; and means for selecting a certain one of the plurality ofquality-rate curves that is associated with a smallest difference of thecomputed differences.
 76. The apparatus of claim 73, wherein theplurality of content classes comprises a plurality of quality-ratecurves, and the means for selecting the one of the plurality of contentclasses includes means for selecting a certain one of the plurality ofquality-rate curves.
 77. The apparatus of claim 73, wherein the meansfor computing the perceived quality metric further includes: means forseparating blocks of pixels of frames of data associated with thesegment into groups based on at least one difference metric associatedwith each of the blocks of pixels; means for associating quality metricvalues and weight values with each of the groups of blocks of pixels;and means for computing a weighted quality metric for the segment ofdata based on the quality metric values and weight values associatedwith of the groups.
 78. The apparatus of claim 77, wherein the means forseparating the blocks of pixels into groups based on at least onedifference metric includes means for separating the blocks of pixelsinto groups based on at least one of a sum of absolute difference (SAD),SAD per pixel (SPP), sum of squared differences (SSD), sum of absolutetransformed difference (SATD), and sum of squared transformed difference(SSTD).
 79. The apparatus of claim 77, wherein the means for separatingthe blocks of pixels into groups based on at least one difference metricincludes: means for separating possible difference metrics into groups,wherein at least a portion of the groups include two or more differencemetrics; means for pre-computes quality metrics associated with each ofthe groups, wherein the quality metrics for the groups is equal to anaverage of quality metrics corresponding to each of the differencemetrics associated with the groups; and means for pre-computes weightsfor each of the groups, wherein the weights for each of the groups arecomputed based on at least a portion of the difference metricsassociated with the bins.
 80. The apparatus of claim 73, wherein themeans for computing the perceived quality metric for the encoded segmentof data includes: means for computing an observed peak signal to noiseratio (PSNR) of the encoded segment of data.
 81. A machine readablemedium having instructions stored thereon, the stored instructionsincluding one or more portions of code, and being executable on one ormore machines, the one or more portions of code comprising: code forcomputing a perceived quality metric for an encoded segment of dataassociated with digital multimedia data; and code for selecting one of aplurality of content classes based on the perceived quality metric andone of at least one encoding parameter used to encode the segment ofdata and a resultant bitrate of the encoded segment of data.
 82. Themachine readable medium of claim 81, further comprising code fornormalizing at least one of the encoding parameters used to encode thesegment of data to correspond with encoding parameters used to generatethe plurality of content classes.
 83. The machine readable medium ofclaim 82, wherein the plurality of content classes comprises a pluralityof quality-rate curves, and further comprising: code for computing, foreach of the quality-rate curves, a difference between the perceivedquality metric and a quality metric on the respective quality-rate curvecorresponding to the normalized encoding parameter; and code forselecting a certain one of the plurality of quality-rate curves that isassociated with a smallest difference of the computed differences. 84.The machine readable medium of claim 81, wherein the plurality ofcontent classes comprises a plurality of quality-rate curves, and thecode for selecting the one of the plurality of content classes includescode for selecting a certain one of the plurality of quality-ratecurves.
 85. The machine readable medium of claim 81, wherein the codefor computing the perceived quality metric further includes: code forseparating blocks of pixels of frames of data associated with thesegment into groups based on at least one difference metric associatedwith each of the blocks of pixels; code for associating quality metricvalues and weight values with each of the groups of blocks of pixels;and code for computing a weighted quality metric for the segment of databased on the quality metric values and weight values associated with ofthe groups.
 86. The machine readable medium of claim 85, wherein thecode for separating the blocks of pixels into groups based on at leastone difference metric includes code for separating the blocks of pixelsinto groups based on at least one of a sum of absolute difference (SAD),SAD per pixel (SPP), sum of squared differences (SSD), sum of absolutetransformed difference (SATD), and sum of squared transformed difference(SSTD).
 87. The machine readable medium of claim 85, wherein the codefor separating the blocks of pixels into groups based on at least onedifference metric includes: code for separating possible differencemetrics into groups, wherein at least a portion of the groups includetwo or more difference metrics; code for pre-computing quality metricsassociated with each of the groups, wherein the quality metrics for thegroups is equal to an average of quality metrics corresponding to eachof the difference metrics associated with the groups; and code forpre-computing weights for each of the groups, wherein the weights foreach of the groups are computed based on at least a portion of thedifference metrics associated with the bins.
 88. The machine readablemedium of claim 81, wherein the code for computing the perceived qualitymetric for the encoded segment of data includes: code for computing anobserved peak signal to noise ratio (PSNR) of the encoded segment ofdata.